
import {simpleServer} from '@/tools/servers'

/**
 * 常见问题
 */
export class CommonQuestionService {
    // 分页查询列表
    static findCommonQuestions (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findCommonQuestions,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/findCommonQuestions', body);
    }


    //根据常见问题Id查询常见问题
    static findCommonQuestion (commonQuestionId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findCommonQuestion ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/findCommonQuestion',body);
    }

    //为了编辑,根据常见问题Id查询常见问题
    static findCommonQuestionForEdit(commonQuestionId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findCommonQuestionForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/findCommonQuestionForEdit',body);
    }

    //为了查看,根据常见问题Id查询常见问题，所有外键字段的名称都已加载
    static findCommonQuestionForView(commonQuestionId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findCommonQuestionForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/findCommonQuestionForView',body);
    }

    //创建新的常见问题
    static createCommonQuestion() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createCommonQuestion,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/createCommonQuestion',body);
    }

    //保存常见问题
    static saveCommonQuestion(commonQuestion) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveCommonQuestion,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/saveCommonQuestion', body);
    }

    //编辑常见问题
    static updateCommonQuestion (commonQuestion) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateCommonQuestion,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/updateCommonQuestion', body);
    }

    //根据常见问题Id删除常见问题
    static deleteCommonQuestion (commonQuestionId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteCommonQuestion,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/deleteCommonQuestion',body);
    }

    //为了查看,根据常见问题Id查询常见问题，只加载ID 和 名称
    static findCommonQuestionsWithIdNameById(commonQuestionId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findCommonQuestionsWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/findCommonQuestionsWithIdNameById',body);
    }

    //为了查看,根据常见问题 名称 查询常见问题，只加载ID 和 名称
    static findCommonQuestionsWithIdNameByName(commonQuestionName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findCommonQuestionsWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/CommonQuestion/findCommonQuestionsWithIdNameByName',body);
    }


}
